package com.open.common.enums;

/**
 * 日志枚举
 *
 * @author dashu03
 * @date 2025-04-08 15:55:55
 */
public enum LogEnum {
    LoginType(0, "登陆日志","loginType");

    private final Integer status;
    private final String name;
    private final String title;

    LogEnum(Integer status, String name, String title) {
        this.status = status;
        this.name = name;
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public Integer getStatus() {
        return status;
    }

    public String getName() {
        return name;
    }

    public static LogEnum fromStatus(Integer status) {
        for (LogEnum log : LogEnum.values()) {
            if (log.getStatus().equals(status)) {
                return log;
            }
        }
        throw new IllegalArgumentException("Unknown status: " + status);
    }
}
